home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Magazin/MacEasy 11
/
Mac Magazin and MacEasy Magazine CD - Issue 11.iso
/
Sharewarebibliothek
/
Schoner
/
The Swarm 1.1.1 Folder
/
The Swarm README
< prev
Wrap
Text File
|
1995-05-21
|
11KB
|
250 lines
_______________________________________________________________
THE SWARM 1.1.1 — A freeware Screensaver Module
By Leo Breebaart, Copyright ©1994-95 Kronto Software
Internet e-mail: leo@cp.tn.tudelft.nl
Internet WWW page: http://www.cp.tn.tudelft.nl/leo/kronto.html
_______________________________________________________________
Description
The Swarm is a simple, but surprisingly elegant and mesmerizing
line animation, in which a number of small line segments (the ‘bees’)
chase one other segment (the ‘queen bee’) across the screen.
Features
• Compatible with After Dark (both 2.0 and 3.0), DarkSide of the Mac and UnderWare.
• Flicker-free animation with smooth fade-out/fade-in effects.
• Intelligent Demo Mode (as if anybody cares :—) ).
• Does not use any permanent System memory under After Dark 2.0.
• Has an animated About Box and thumbnail.
• Runs under both MultiModule and the Randomizer — without crashing.
• Comes with extensively documented source code (THINK C 7.0.4 format).
• Both the module and the source code are free.
Restrictions & Technical Remarks
• The Swarm needs Color QuickDraw to run. A color screen is not essential,
however: on a Black & White SE/30 the module works just fine.
• Multiple-monitor setups are supported, but not actively used — the animation
always runs on the main monitor only (and will simply black out any other screens).
• I cannot guarantee that The Swarm will work with versions of After Dark
earlier than 2.0u. The same holds for any other programs that are supposed
to be able to play After Dark modules (except for DarkSide and UnderWare,
which I had access to). In all such cases, The Swarm may run, or it may not.
Feedback about compatibility issues will be much appreciated.
• At the moment of writing the latest version numbers of the screensavers
The Swarm has been tested to work with are 3.0b for After Dark, 4.2 for DarkSide
and 1.0.1 for UnderWare. Free updaters for these programs are readily available
on the Internet and on all the major commercial software archives. See also the
URL appendix at the end of this document.
Who thought of it first
I first came across this animation in an X Windows program called xswarm,
written by Jeff Butterworth in the early 90s. I liked it so much that I
decided to write an After Dark version. Most of the module I had to create
from scratch, but the core algorithm was taken straight from Jeff’s
sources. My module, of course, lacks all the many options that his X Windows
program has. If you have access to an appropriate machine, be sure to
check out xswarm — it’s great.
Who else thought of it first
Shortly after I began programming this module it was brought to my
attention that there already was a ‘swarm’ After Dark module, called
ColorSwarm!, written by Dan Walkowski in 1991.
Since his module looked a bit different from what I had in mind, I just went
ahead and wrote my own version anyway. But be sure to check out his module.
He has more parameters for you to set, his ColorSwarm! works on B&W
machines without Color QuickDraw, and I believe he also makes use of multiple
monitors, which I don’t.
Version history
1.0 25 Mar 1994
— Initial release.
1.1 24 Feb 1995
— Bees on 256-color screens will now change color as they move along. Added
a new slider to control the color-changing speed.
— Had to sacrifice the 'smooth fade' checkbox to make room for the new slider.
The Swarm now always fades smoothly, if possible.
— The About Box now wil take advantage of After Dark 3.0’s expanded
about box area (provided you’re running 3.0, of course. Duh.).
— Added animated thumbnail for After Dark 3.0.
— Cleaned up the source code.
1.1.1 19 May 1995
— Fixed a bug that caused crashes for people running the module on a Mac IIsi
under DarkSide.
— Shortened the duration of the fade-out when the module kicks in, and entirely
removed the fade-in when the module ends. Having to wait so long for the
fade effects to take place got on people’s nerves (including mine).
— Removed all references to the After Dark FTP Site and the Programmers’ List,
because both are now (temporarily) defunct.
Credits & Acknowledgments
First of all, my thanks to Jeff Butterworth for giving me permission to ransack
his code and port his algorithm to the Mac.
For technical assistance, emotional support and beta-testing I owe a sincere
thank-you to Rodney “Jewelbox” Jacks, to Lloyd “Screensaver FAQ” Wood, and to
all the members of the After Dark programmers mailing list.
Without Timo Eloranta’s error reports and his willingness to crash his Mac for me I would
never have been able to track down the IIsi-killing bug in version 1.1.
Special thanks to Jonas Englund, for allowing me to use, adapt and distribute
his CLUT fading code.
Extra special thanks to David “Bat Signal” Zwiefelhofer, to Joseph
“Peek-a-Boo” Judge, and to Berkeley Systems themselves for releasing sample
source code and documentation without which this module would never have
been written in the first place.
The Swarm was created using THINK C 7.0.4, Think Reference 2.0.1,
ResEdit 2.1.3, BBEdit 3.1.1, and Adobe Photoshop 3.0.1.
Known Problems
• The color-changing bees was the single most-requested feature for
The Swarm, so I added it. However, the current implementation is just
a quick interim hack to make it work for at least some of the people. In
particular: the bees will only change color on displays in 8-bit (256 color)
mode, never in modes with a higher or lower number of colors. Fixing this
will be one of the top priorities for the next version of The Swarm.
• The color-changing slider has no effect in demo-mode.
• Under certain very rare circumstances (specifically: if you have a
multi-monitor setup in which your main monitor (the one with the menu
bar) is not placed in the ‘left-upper-most’ position in the Monitors control
panel) the module will start drawing garbage on your screen when
activated. This is an entirely cosmetic bug, and I know precisely what’s
causing it — I just don’t know how to fix it, yet.
• Under certain other not-so-rare circumstances (specifically: if After
Dark starts displaying a “Please Wake Up” message while the module
is running, e.g. when a background application wants your attention) the
module will also start drawing garbage to your screen. This too, is an entirely
cosmetic bug — but I’l be darned if I know what’s causing it, or how to
fix it.
• Those of you interested in the source code should be aware (you may
have already gathered it from the above few paragraphs :-) ) that I am
not an experienced Macintosh programmer — in fact, The Swarm was my
very first programming effort for the Mac. This means that the code
may have hidden problems that I’m simply not aware of. Don’t assume
that I’m always doing things the ‘right’ way!
I would appreciate hearing about any other bugs or problems you may encounter
with The Swarm.
A Word about Memory and CPU-time
The Swarm tries to be a well-behaved, system-friendly module. It will, for
instance, not reserve any permanent memory in your system heap. That
means that having The Swarm selected costs you no more memory than having
the default ‘Starry Night’ module selected, as long as After Dark has not
taken over the screen.
Of course, once After Dark kicks in, The Swarm does need loads of memory
for its animation (the larger your screen the worse it gets), which it
will try to allocate out of the free memory you have at that moment. In
low-memory situations (e.g. if you have lots of applications open), this
attempt may be unsuccessful, and the module will refuse to run with an
appropriate error message. The reason I am explaining all of this in such
detail is that the upshot of this strategy is that you may see The Swarm
‘fail’ to run more often than other modules. But that is entirely
intentional, and only means that it is your real applications which are
getting access to every last Kb of your available memory. Isn’t that how
things should be?
On fast Macs (Quadra’s or higher), finally, you will want to use the ‘Swarm
Speed’ slider in the control panel to slow the animation down. Here too, I
just want to point out that if you do this, then the extra CPU time will be
given back to the system. The Swarm will never use more processing power
then it really needs.
Still To Do
Version 1.1.1 is just a minor upgrade to version 1.0. There will be a major new
version of The Swarm, although for the coming months (I’m writing this in
May 1995) I won’t have time to work on it, sorry. For The Swarm 2.0
I intend the following features and fixes:
• PowerMac native code.
• Allow color-changing bees on non-CLUT devices (i.e. non-8-bit modes)
• Add more parameters for you to play with.
• Make Queen Bee behave more intelligently and interestingly.
• Multiple Swarms, or maybe multiple Queen Bees (there’s a difference!).
• Add sound/music.
• Add an option to make the entire Swarm move 3-dimensionally, with
depth indicated by perspective projection and color brightness.
• Support old, non-Color Quickdraw B&W Macs.
If you have any suggestions to add to this list, let me know.
For Programmers
The most recent version of the After Dark programmer’s interface (which
also gets updated sometimes — the copy that came with your diskette may
be outdated!) is available from the major Internet archive sites such
as sumex.stanford.edu, mac.archive.umich.edu and their mirrors.
You may also want to take a look at ScreenFlip, another screensaver
module I wrote, which also comes with documented source code.
Final Remark
Nobody who owns a Macintosh screensaver package should be without
the most recent version of Lloyd Wood’s Screensaver FAQ (Frequently
Asked Questions) List. Copies of this list are also available from all major
archive sites on or off the Internet. It is a must-have. Trust me.
Enjoy,
__
Leo Breebaart (leo@cp.tn.tudelft.nl)
_______________________________________________________________
Appendix: URLs
Here are URLs for some of the Internet resources mentioned in this document.
Newer versions of these files may of course have been released by the time
you read this. Most of the files are available from many other sites as well.
Kronto Software WWW/ftp sites (for info about me and my other programs):
http://www.cp.tn.tudelft.nl/leo/kronto.html
ftp://kronto.cp.tn.tudelft.nl/pub/macintosh/
DarkSide of the Mac 4.2:
ftp://ftp.apple.com/dts/mac/hacks/darkside-of-the-mac-4-2.hqx
Macintosh FAQs WWW/ftp sites:
http://www.astro.nwu.edu/lentz/mac/faqs/home-faqs.html
http://www.ee.surrey.ac.uk/Personal/L.Wood/screensavers/
ftp://rtfm.mit.edu/pub/usenet/news.answers/macintosh/
Original X-Windows xswarm program:
ftp://ftp.x.org/R5contrib/xswarm.2.3.tar.Z
_______________________________________________________________